﻿/*
 * Created by SharpDevelop.
 * User: IEscarro
 * Date: 9/8/2009
 * Time: 10:17 AM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using Buaya.Model.Dao.Interface;
using Buaya.Model.Dao.Access;
using System.Data.OleDb;
using System.Data;
using System.Configuration;

namespace Buaya.Model.Dao
{
	/// <summary>
	/// Description of AccessDaoFactory.
	/// </summary>
	public class AccessDaoFactory : DaoFactory
	{
		public AccessDaoFactory()
		{
		}
		
		public static OleDbConnection CreateConnection()
		{
			return new OleDbConnection(ConfigurationManager.ConnectionStrings["oledbConnection"].ConnectionString);
		}
		
		public override IDepartmentDao CreateDepartmentDao()
		{
			return new AccessDepartmentDao();
		}
		
		public override IEmployeeDao CreateEmployeeDao()
		{
			return new AccessEmployeeDao();
		}
	}
}
